package cn.lgwen.candy.runtime.driver;

import cn.lgwen.candy.runtime.operator.Fetcher;
import cn.lgwen.candy.runtime.operator.SourceOperator;

/**
 * 2019/12/26
 * aven.wu
 * danxieai258@163.com
 */
public class DataSourceTask<T> implements Runnable {

    private Fetcher<T> fetcher;

    private SourceOperator<T> sourceOperator;

    public DataSourceTask(Fetcher<T> fetcher, SourceOperator<T> sourceOperator) {
        this.fetcher = fetcher;
        this.sourceOperator = sourceOperator;
    }

    @Override
    public void run() {
        sourceOperator.run(fetcher);
    }
}
